package emp.jsf.servicio.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import emp.entidades.EntArticuloImg;
import emp.jsf.servicio.ArticuloImgService;
import emp.repositorios.ArticuloImgRepository;

@Service("articuloImgService")
public class ArticuloImgServiceImpl implements ArticuloImgService{

	@Autowired
	ArticuloImgRepository articuloImgRepository;
	
	public List<EntArticuloImg> listarArticuloImg(){
		return articuloImgRepository.findAll();
	}
	
	public EntArticuloImg grabarArticuloImg(EntArticuloImg ent){
		return articuloImgRepository.saveAndFlush(ent);
	}
	
	public void eliminar(EntArticuloImg ent){
		articuloImgRepository.delete(ent);
	}
	
}
